﻿@using EC.Entity.Response.Settle
@using EC.Entity.Enum

@model EC.Entity.PagedList<SettleQueryResponse>
<div class="data-body data-scroll">
    <div class="data-view">
        <div class="data-div-view table-responsive">
            <table class="table table-hover table-striped table-bordered">
                <thead>
                    <tr>
                        <th class="t_l wd100">结算金额</th>
                        <th class="t_l wd100">手续费</th>
                        <th class="t_l wd100">银行名称</th>
                        <th class="t_l wd100">姓名</th>
                        <th class="t_l wd175">卡号</th>
                        <th class="t_l wd100">申请时间</th>
                        <th class="t_l wd150">处理时间/处理人</th>
                        <th class="t_l">备注</th>
                        <th class="t_l wd100">状态</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null && Model.TData != null && Model.TData.Any())
                    {
                        foreach (var item in (IEnumerable<SettleQueryResponse>)Model.TData)
                        {
                    <tr>
                        <td class="t_l wd100">@(item.Amount)/复制</td>
                        <td class="t_l wd100">@(item.Fee)</td>
                        <td class="t_l wd100">@(item.BankName)</td>
                        <td class="t_l wd100">@(item.CardName)/复制</td>
                        <td class="t_l wd175">@(item.CardNumber)/复制</td>
                        <td class="t_l wd100">@(item.CreatedDate.ToString("MM-dd HH:mm:ss"))</td>
                        <td class="t_l wd150">
                        @{ 
                            if (item.HandTime.HasValue && item.HandBy.HasValue)
                            {
                                <span>@(item.HandTime.Value.ToString("MM-dd HH:mm:ss"))/@(item.HandBy)</span>
                            }
                        }
                        </td>
                        <td class="t_l">@(item.Remark)</td>
                        <td class="t_l">
                            @switch (item.Status)
                            {
                                case (sbyte)SettleStatus.未处理:
                                    <span class="bold">未处理</span>
                                    break;
                                case (sbyte)SettleStatus.处理中:
                                    <span class="bold">处理中</span>
                                    break;
                                case (sbyte)SettleStatus.已打款:
                                    <span class="bold">已打款</span>
                                    break;
                                case (sbyte)SettleStatus.驳回:
                                    <span class="bold">驳回</span>
                                    break;
                                default:
                                    <span></span>
                                    break;
                            }
                        </td>
                    </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="9" class="t_c">暂无记录</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 必要的分页参数设置 -->
<input type="hidden" id="TotalCount" value="@(Model != null ? Model.TotalCount : 0)" />